Skip to content

Add wandering humans to simulation with LiDAR detection and camera object-detection overlays#6

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-camera-and-humans-sensor
Draft

Add wandering humans to simulation with LiDAR detection and camera object-detection overlays#6
Copilot wants to merge 2 commits intomainfrom
copilot/add-camera-and-humans-sensor

Conversation

Copy link
Contributor

Copilot AI commented Mar 3, 2026

The simulation lacked human obstacles for LiDAR to detect, and the camera viewport had no object-detection visualization.

Humans

  • 5 NPC stick figures spawn alongside blocks when Chassis is added; wander with random direction changes and wall bouncing
  • getLidarDetection() extended to scan humans (circle collision via pointToSegmentDist) after block scan; returns { ...obj, type: 'block' | 'human' }
  • Detection panel shows "● HUMAN DETECTED" (orange) vs "● OBJECT DETECTED" (green)

Camera object detection & tracing

  • drawCameraView() refactored with a shared project() helper for perspective projection
  • Blocks get cyan bounding boxes + shape label (Square / Circle / Triangle)
  • Humans render as grey silhouettes with orange bounding boxes + "Human" label
  • Box size scales with distance via the existing perspective projection
// LiDAR now checks humans after blocks
for (const h of humans) {
  if (pointToSegmentDist(h.x, h.y, lidarX, lidarY, beamEndX, beamEndY) < h.size / 2) {
    return { ...h, type: 'human' };
  }
}

Screenshots

Humans wandering on the main canvas with the robot:
Main canvas with humans

LiDAR + Camera active — bounding box with shape label visible in camera viewport:
Camera with detection boxes


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…ction boxes

Co-authored-by: A1L13N <193832434+A1L13N@users.noreply.github.com>
Copilot AI changed the title [WIP] Add LIDAR detection for humans and camera sensor Add wandering humans to simulation with LiDAR detection and camera object-detection overlays Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants